#define  _CRT_SECURE_NO_WARNINGS 1	
#include<stdio.h>

double sum1(double x)
{
	double sum = 0;
	for (int i = 1; i <= x; i += 2)
	{
		sum = sum + 1.0 / i;
	}
	return sum;
}

double sum2(double y)
{
	double sum = 0;
	for (int i = 2; i <= y; i += 2)
	{
		sum = sum + 1.0 / i;
	}
	return sum;
}
int main()
{
	int x, y;
	scanf("%d%d", &x, &y);
	double ret = 0;
	ret = sum1(x) - sum2(y);
	printf("%lf", ret);
	return 0;
}